﻿/*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
using HtmlAgilityPack;

namespace WeatherviewWebscraperManager
{
    class Program
    {
        static void Main(string[] args)
        {

            string urlToUse;

            //basic info
            Console.WriteLine("");
            Console.WriteLine("Weatherview - Web Scraper Manager");
            Console.WriteLine("");
            Console.WriteLine("Info: Provides information on web scraping processes");
            Console.WriteLine("");
            Console.WriteLine("WARNING: Please only use this application if you know what your doing");
            Console.WriteLine("Some websites forbid the use of scraping, please use this application responsibly.");
            Console.WriteLine("This application is licensed under the main Weatherview licensing agreements.");
            Console.WriteLine("");
            Console.WriteLine("-----------------------------------------------------------------------------------");

            //get url
            Console.WriteLine("");
            Console.WriteLine("To being enter a valid URL, this address will not be checked, be careful.");
            urlToUse = Console.ReadLine();

            try
            {
            // getting the html file via the HTML Agility Pack
            HtmlWeb htmlObject = new HtmlAgilityPack.HtmlWeb();
            HtmlDocument htmldocument = htmlObject.Load(urlToUse);
            }
            catch
            {
                Console.WriteLine("");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("");
                Console.WriteLine("ERROR!");
                Console.WriteLine("the url you tried to use could not be loaded by the application, press any key to close the program.");
                Console.ReadLine(); //keeps window open
            }

            // I have to do this again so it works
            //HtmlWeb htmlObject = new HtmlAgilityPack.HtmlWeb();
            //HtmlDocument htmldocument = htmlObject.Load(urlToUse);

            

            // XPath query on XML to get all the href attributes
            // see http://www.w3schools.com/XPath/xpath_syntax.asp for syntax
            string query = "//@href";

            
            HtmlNodeCollection nodes = htmldocument.DocumentNode.SelectNodes(query);




            // List all the <a> and their href attributes
            foreach (HtmlNode n in nodes)
                Console.WriteLine("{0} ** {1}", n.InnerText, n.Attributes[0].Value);

            //keeps window open
            Console.ReadLine();
        }
    }
}
*/